#9 ✓resolved
Rick DeNatale

Problem when EXDATEs have timezones

Reported by Rick DeNatale | May 22nd, 2009 @ 12:04 PM | in 0.0.11

It appears that having timezones on EXDATEs is preventing them from excluding occurrences.

The Icalendar data in the spec below contains an exdate for each normal occurrence of the event, so it should have no occurrences. I verified this interpretation by importing it into ical.app.

The data came from a calendar file which Paul sent which was causing a missing_method <=> on Hash. I fixed that problem, but in the process discovered this anomaly.

  context "EXDATES with timezones bug" do
    before(:each) do
      cals = RiCal.parse_string rectify_ical <<-ENDCAL
      BEGIN:VCALENDAR
      METHOD:PUBLISH
      PRODID:-//Apple Inc.//iCal 3.0//EN
      CALSCALE:GREGORIAN
      X-WR-CALNAME:Utah Cycling
      X-WR-RELCALID:BF579011-36BF-49C6-8C7D-E96F03DE8055
      VERSION:2.0
      X-WR-TIMEZONE:US/Mountain
      BEGIN:VTIMEZONE
      TZID:US/Mountain
      BEGIN:DAYLIGHT
      TZOFFSETFROM:-0700
      TZOFFSETTO:-0600
      DTSTART:20070311T020000
      RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
      TZNAME:MDT
      END:DAYLIGHT
      BEGIN:STANDARD
      TZOFFSETFROM:-0600
      TZOFFSETTO:-0700
      DTSTART:20071104T020000
      RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
      TZNAME:MST
      END:STANDARD
      END:VTIMEZONE
      BEGIN:VEVENT
      SEQUENCE:11
      TRANSP:OPAQUE
      UID:15208112-E0FA-4A7C-954C-CFDF19D1B0E7
      DTSTART;TZID=US/Mountain:20090114T163000
      DTSTAMP:20090107T024340Z
      SUMMARY:Wild Rose XC/Skate Training Series
      EXDATE;TZID=US/Mountain:20090114T163000
      EXDATE;TZID=US/Mountain:20090128T163000
      EXDATE;TZID=US/Mountain:20090121T163000
      EXDATE;TZID=US/Mountain:20090211T163000
      EXDATE;TZID=US/Mountain:20090204T163000
      EXDATE;TZID=US/Mountain:20090218T163000
      CREATED:20090107T024012Z
      DTEND;TZID=US/Mountain:20090114T180000
      LOCATION:Mountain Dell Golf Course
      RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20090219T065959Z
      END:VEVENT
      END:VCALENDAR
      ENDCAL
      @event = cals.first.events.first
    end
    
    it "should have no occurrences" do
      rputs @event.exdate_property
      @event.occurrences.length.should == 0
    end
  end

The initial assumption is that the time zones are causing the problem, I am currently investigating.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

A new icalendar data (RFC 2445) gem for Ruby which supports time zones and enumeration of occurrences

Shared Ticket Bins

People watching this ticket

Pages